<div class="panel-content col-lg-8 col-lg-offset-2">
    <h4 class="mb-md center-block">新建公告</h4>
    <form action="/ajax/messageAdd" method="post" onsubmit="return check()">
        <div class="form-group">
            <label for="title">标题</label>
            <input type="text" class="form-control" name="title" placeholder="标题">
        </div>
        <div class="form-group">
            <label  for="priority">优先级</label>
            <div >
                <select name="priority" id="select2-example-basic" class="form-control" style="width: 100%">   
                    <option value="1" label="1"></option>
                    <option value="2" label="2"></option>
                    <option value="3" label="3"></option>
                    <option value="4" label="4"></option>
                </select>
            </div>
        </div>
        <div class="form-group center-block">
                <label for="receiveGroup">接收班级</label>
                <div>
                    <select name="receiveGroup" id="select2-example-basic" class="form-control" style="width: 100%">   
                        <option value="1" label="15级创新班"></option>
                        <option value="2" label="16级创新班"></option>
                        <option value="3" label="17级创新班"></option>
                    </select>
                </div>
            </div>
        <div class="form-group">
                <label for="body"></label>
            <textarea name="body" class="form-control" rows="10" id="question" placeholder="请输入公告信息。"></textarea>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-primary">提交</button>
        </div>
    </form>
</div>
    <script>
        function check(){
            var text = $('#question').val();
            if(text==''){
                alert('请填写公告信息')
                return false
            }else{
                return true
            }
        }
    </script>